#ifndef __THREADGUARD_H__
#define __THREADGUARD_H__

#include <thread>
#include "HDefine.h"
#include "HNoCopyable.h"

HTHREADPOOL_NAMESPACE_BEGIN
    //为了后续扩展
    class ThreadGuard : public HNoCopyable
    {

    public:
        ThreadGuard(std::thread& _t);

        ~ThreadGuard();

        //        // 禁止复制和赋值，避免意外的资源管理问题
        //        ThreadGuard(const ThreadGuard&) = delete;
        //        ThreadGuard& operator=(const ThreadGuard&) = delete;
    private:
        std::thread& t;
    };

HTHREADPOOL_NAMESPACE_END

#endif
